const mysql = require('mysql');

module.exports = {
	config:{
		host: '8.134.253.42',
		port: '3306',
		user: 'root',
		password: 'Weibing123',
		database: 'mlt'
	},
	sqlConnect(sql,sqlArr,callBack){
		var pool = mysql.createPool(this.config);
		pool.getConnection((err,conn)=>{
			if(err) { console.log('连接失败'); return;}
			//事件回调
			conn.query(sql,sqlArr,callBack);
			//释放
			conn.release()
		})
	}
}